package com.xujinchen.struct;

public class ForDemo05 {
    public static void main(String[] args) {
        int[] numbers ={10,20,30,40};

        for (int i =0;i<4; i++) {//i<5会报错一定要考虑数组的长度。
            System.out.println(numbers[i]);
        }

        System.out.println("===============================");
         //遍历数组元素
        for (int x:numbers){
            System.out.println(x);
        }
    }

}
